home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / utility / fcbin12.zip / FCBIN.DOC next >
Text File  |  1992-09-25  |  21KB  |  521 lines

  1.  
  2.  
  3.                                   FCBIN Ver. 1.2
  4.                         Copyright (c) 1990-1992 Mike Albert
  5.                                   September 1992
  6.  
  7.  
  8.  
  9.      1   INTRODUCTION
  10.  
  11.      FCBIN compares two files and lists the differences between them byte by
  12.      byte.  FCBIN provides the following benefits:
  13.  
  14.          o   FCBIN shows PER BYTE differences between files.  Line endings
  15.              are treated just like other characters.
  16.  
  17.          o   Any type of file - ASCII, executable, data base, etc. - can be
  18.              compared.
  19.  
  20.          o   FCBIN never gets confused or "unsynchronized" (as some
  21.              comparison programs can).
  22.  
  23.          o   FCBIN always finds the smallest set of differences between
  24.              files, and never misses matching bytes.
  25.  
  26.          o   FCBIN lets you do multiple comparisons in one run.
  27.  
  28.          o   FCBIN can be customized to use your favorite options
  29.              automatically.
  30.  
  31.      If you're familiar with earlier versions of FCBIN, look at section 7 to
  32.      learn about the enhancements.
  33.  
  34.      FCBIN can be used on any IBM-compatible computer.  Any display adapter
  35.      that provides 80 character lines, including those with more than 25
  36.      lines per screen, will work correctly.  FCBIN runs under MS-DOS versions
  37.      2.0 and later, but 3.0 or later is required to customize the default
  38.      options.  The amount of memory required is dependent on file size.  100K
  39.      is enough for small files, while up to 425K is needed for large ones.
  40.      Files containing up to 32,700 bytes can be compared.
  41.  
  42.  
  43.  
  44.      2   OPERATION
  45.  
  46.      To list the differences between two files byte by byte:
  47.              fcbin  file1  file2  options
  48.  
  49.      Changes to file1 to make file2 are listed.  Wild-card characters can be
  50.      used to do multiple comparisons.  The options are:
  51.  
  52.              -a      list all bytes (whether different or the same)
  53.              -s      list only bytes that are the same
  54.              -c<n>   show context for changes - list up to <n> unchanged
  55.                      bytes as changed when that's clearer - default <n> is 1
  56.              -x      show extended ASCII characters
  57.              -u      update default options, -u- clears old defaults first
  58.              >file3  put difference listing in file file3
  59.  
  60.      A default option can be turned off with a minus sign, e.g. -x- turns off
  61.      the -x option.  You can also make an option affect only screen output or
  62.      file output - an "s" after the option letter indicates screen output,
  63.      while "f" indicates file output.  E.g. -cs5 specifies that the -c5
  64.  
  65.  
  66.                                        - 1 -
  67.  
  68.      option is used for screen output, but doesn't affect output to a file.
  69.      This feature is useful when updating default options (with the -u
  70.      option), because you often want different options for the two output
  71.      devices.
  72.  
  73.      The following examples illustrate the use of FCBIN:
  74.  
  75.          Compare two files in the current directory and display the
  76.          differences on the screen:
  77.  
  78.              fcbin  db1.asc  db2.asc
  79.  
  80.          Compare two files in different directories and drives, list all
  81.          bytes, and put the difference listing in file db2.dif:
  82.  
  83.              fcbin  d:\backup\db1.asc  c:\tc\db2.asc  -a  >db2.dif
  84.  
  85.          Compare two files with the same names in different directories and
  86.          drives and display the differences:
  87.  
  88.              fcbin  d:\backup\db1.asc  c:\tc
  89.  
  90.          Compare all files with ".c" extensions and the same names in two
  91.          different directories:
  92.  
  93.              fcbin  \backup\*.c  \tc\*.*
  94.  
  95.          Change the default options for future invocations of FCBIN to -x for
  96.          output to either output device, and -c5 for output to the screen:
  97.  
  98.              fcbin  -u-  -x  -cs5
  99.  
  100.          Turn off the -x default option (which was previously set) for output
  101.          to a file, but leave it on for screen output:
  102.  
  103.              fcbin  -u  -xf-
  104.  
  105.  
  106.  
  107.      3   DETAILED OPERATION
  108.  
  109.      The arguments to FCBIN (files and options) can be supplied in any order.
  110.      The options work as follows:
  111.  
  112.          -a      All - FCBIN normally lists only the bytes that differ
  113.                  between the two files.  With the -a option, matching bytes
  114.                  are also listed.
  115.  
  116.          -s      Same - With the -s option, only matching bytes are listed.
  117.  
  118.          -c<n>   Context - When this option is used, FCBIN shows context
  119.                  surrounding changes to make the listing more readable.  This
  120.                  is done by listing unchanged bytes as changed when they are
  121.                  between changed bytes.  Use this option when you want to
  122.                  make the listing easier to understand, and don't care if a
  123.                  few unchanged bytes are listed as changed.  The value <n>
  124.                  indicates how many unchanged bytes can be listed as changed.
  125.                  The default value of <n> is 1.
  126.  
  127.          -x      Extended ASCII - FCBIN normally displays only printable
  128.                  ASCII characters, i.e. those with values from hex 20 through
  129.  
  130.  
  131.                                       - 2 -
  132.  
  133.                  7E, in the character portion of the listing.  With the -x
  134.                  option, all characters (except some control characters) are
  135.                  displayed.  The hexadecimal portion of the listing always
  136.                  shows all characters.
  137.  
  138.          -u      Update - This feature updates the default options.  You can
  139.                  use this option to make your favorite options the default,
  140.                  so you don't have to enter them every time you use FCBIN.
  141.                  When you use the -u option, the current options (i.e. the
  142.                  current defaults plus options specified on the command line)
  143.                  become the default.  The -u- option is like -u, except that
  144.                  the current defaults are ignored - only the options shown on
  145.                  the command line become the new defaults.  FCBIN can't
  146.                  update the options and compare files in the same run, so
  147.                  don't specify file names when you use the -u or -u- option.
  148.                  This feature works by changing the program (i.e. fcbin.exe)
  149.                  file.  If you want, you can make multiple FCBIN's with
  150.                  different default options by simply copying the fcbin.exe
  151.                  file with a new name (e.g. fcall.exe) and using the -u
  152.                  option to set the default values of the copy.  This feature
  153.                  only works with MS-DOS version 3.0 or later.
  154.  
  155.          >file   FCBIN normally displays the difference listing on the
  156.            or    screen.  This option directs the listing to the file you
  157.          >>file  specify - just enter the file name after the ">".  If the
  158.                  file already exists, it is overwritten.  The ">>" option can
  159.                  be used in the same way to append the listing to the end of
  160.                  a file, instead of overwriting it.
  161.  
  162.  
  163.      The file names specify a drive and directory in the normal MS-DOS
  164.      manner.  If no drive is specified, FCBIN looks for files on the current
  165.      drive.  If no directory is specified, FCBIN looks in the current
  166.      directory.  The standard MS-DOS wild-card characters may be used to
  167.      compare multiple files.  When FCBIN finds wild-card characters in the
  168.      first file name, it performs a compare for each matching file.  A wild-
  169.      card character in the second name means use the name (or extension) of
  170.      the first file.  If the second file is not found FCBIN indicates it is
  171.      missing, and continues with other files that match the first name.  If
  172.      you specify a directory or drive (without a file name and extension) for
  173.      either the first or second name, FCBIN acts as though you specified a
  174.      file and extension of "*.*".  The following examples illustrate these
  175.      principles:
  176.  
  177.          Compare all files with ".c" extensions and the same names in two
  178.          different directories:
  179.  
  180.              fcbin  \backup\*.c  \tc
  181.  
  182.          Compare files fcupdate.c1 and fcupdate.c2:
  183.  
  184.              fcbin  fcupdate.c1  *.c2
  185.  
  186.          Compare all files in the current directory with ".c1" extensions
  187.          with files that have the same names and ".c2" extensions in the same
  188.          directory:
  189.  
  190.              fcbin  *.c1  *.c2
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                                       - 3 -
  197.  
  198.          Compare all files in current directory with files that have the same
  199.          names on the diskette in drive b:
  200.  
  201.              fcbin  .  b:
  202.  
  203.          Compare all files with names starting with "a" and having a ".c"
  204.          extension with files that have the same names in the directory
  205.          "work" that is a subdirectory of the parent directory of the current
  206.          directory:
  207.  
  208.              fcbin  \backup\a*.c  ..\work
  209.  
  210.  
  211.      If you display the difference listing on the screen, you can control the
  212.      scrolling.  When FCBIN is scrolling, pressing any key makes it pause.
  213.      When it pauses, you can use the following keys:
  214.  
  215.          Enter   Show another screen full
  216.          space   Show one more line
  217.          s       Scroll continuously
  218.          ESC     Exit the program
  219.  
  220.      You can also use the Ctrl-S and Ctrl-Q keys (the ASCII terminal
  221.      convention) to regulate scrolling if you prefer.
  222.  
  223.  
  224.  
  225.      4   FCBIN MESSAGES
  226.  
  227.          Error: argument -<x> is invalid
  228.              FCBIN couldn't recognize the argument you specified on the
  229.              command line (argument <x>).  Check the list of arguments that
  230.              FCBIN accepts to determine what options you can use.  You can
  231.              list the options FCBIN recognizes by typing "fcbin ?".
  232.  
  233.          Error: the -<x> option value <v> is wrong
  234.              FCBIN couldn't recognize the value <v> specified with the <x>
  235.              option on the command line.  Most options accept one or two
  236.              decimal digits, e.g. -c4.  An example of a value specified for
  237.              screen display only is -cs5.  Check the list of options that
  238.              FCBIN accepts to determine what values you can use.  You can
  239.              list the options and values FCBIN recognizes by typing "fcbin
  240.              ?".
  241.  
  242.          Error: option -<x> doesn't accept a value
  243.              FCBIN found a value specified for option <x>, but that option
  244.              doesn't accept a value.  You can list the options FCBIN
  245.              recognizes by typing "fcbin ?".
  246.  
  247.          Error: both -<x> and -<y> options specified together
  248.              FCBIN found two incompatible options (<x> and <y>) specified on
  249.              the command line.  You can only use one at a time.
  250.  
  251.          Warning: -<x> default option ignored because -<y> option specified
  252.              FCBIN found an option (argument <x>) on the command line that
  253.              conflicts with default option <y>.  FCBIN ignored the default
  254.              option.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                       - 4 -
  262.  
  263.          Warning: -<x> option ignored because it conflicts with -<y> default
  264.          option
  265.              FCBIN found an option (argument <x>) on the command line that
  266.              conflicts with default option <y>.  FCBIN ignored the option on
  267.              the command line.
  268.  
  269.          Error: <n> is too small a value for option -<x> - the lower limit
  270.          is <m>
  271.              FCBIN found a value (<n>) specified for option <x> that is too
  272.              small.  You must specify a value greater than or equal to <m>.
  273.  
  274.          Error: <n> is too large a value for option -<x> - the limit is <m>
  275.              FCBIN found a value (<n>) specified for option <x> that is too
  276.              large.  You must specify a value less than or equal to <m>.
  277.  
  278.          Error: more than two file names specified
  279.          Error: fewer than two file names specified
  280.              FCBIN didn't find the names of two files to compare on the
  281.              command line.  If you forgot to specify the minus sign ("-") in
  282.              front of an option, FCBIN interpreted it as a file name.  You
  283.              must specify two file names.
  284.  
  285.          Error: file <f> wasn't found
  286.              FCBIN couldn't find file <f>.  If you didn't specify a directory
  287.              or drive, FCBIN looked in the current directory and drive.  Make
  288.              sure you specify the correct file name, with the directory and
  289.              drive if needed, on the command line.
  290.  
  291.          Error: no files found at <f>
  292.              FCBIN couldn't find any files in directory or drive <f>.  Make
  293.              sure you specify the correct drive and directory on the command
  294.              line.
  295.  
  296.          Error: no files match <f>
  297.              FCBIN couldn't find any files that matched file name <f>, which
  298.              contains wild-card characters.  Make sure you specify the
  299.              correct file name on the command line.
  300.  
  301.          Error: more than 32,700 bytes in file <f>
  302.              File <f> contains more than 32,700 bytes.  FCBIN can only
  303.              process files containing up to 32,700 bytes.  Your only option
  304.              is to break your files into smaller files.
  305.  
  306.          Error: not enough memory to process these files
  307.              FCBIN needs more memory to process these files than is
  308.              available.  FCBIN will continue by comparing the remaining files
  309.              if you specified multiple comparisons, otherwise it will
  310.              terminate.  The only way to correct this problem is to run on a
  311.              machine with more memory, remove any memory-resident programs,
  312.              or to split the file into smaller files.  This problem only
  313.              occurs when comparing large files on machines with small memory
  314.              configurations.
  315.  
  316.          Error: output failed, disk probably full
  317.              FCBIN detected an error when writing a file.  This only occurs
  318.              when the difference listing is directed to a file with the ">"
  319.              or ">>" options.  The most likely cause of this error is a full
  320.              disk.
  321.  
  322.  
  323.  
  324.  
  325.  
  326.                                       - 5 -
  327.  
  328.          Error: file names can't be used with the -u option
  329.              FCBIN found file names specified on the command line with the -u
  330.              or -u- option.  You can't update default options and compare
  331.              files at the same time.
  332.  
  333.          Error: couldn't update default options
  334.              FCBIN couldn't write to the program (i.e. fcbin.exe) file to
  335.              update the default options.  This happens when the fcbin.exe
  336.              file is on a write-protected floppy disk, the file has been
  337.              given the read-only attribute, you're using an MS-DOS version
  338.              less than 3.0, or the file is on a network server and you don't
  339.              have write privileges for the file.
  340.  
  341.  
  342.  
  343.      5   LICENSING, WARRANTY, and REGISTRATION
  344.  
  345.      FCBIN is distributed as shareware.  I encourage you to try FCBIN and
  346.      share it with friends as long as:
  347.  
  348.          The FCBIN program and this documentation file are not modified and
  349.          are distributed together.
  350.  
  351.          FCBIN is not provided as a part of any other product.
  352.  
  353.          No fees, beyond a reasonable fee for media, duplication, or
  354.          downloading costs, are charged.
  355.  
  356.          FCBIN is not used for commercial, government, or business purposes
  357.          without registration.  Each registration is for a single person or a
  358.          single computer.
  359.  
  360.      If you find FCBIN useful and decide to use it regularly, you are
  361.      required to register.  All registration payments will be donated to
  362.      Oxfam America, an international development and disaster relief agency.
  363.      It's a worthy charity that I've been supporting for many years.  For
  364.      more information on Oxfam see section 6.
  365.  
  366.      When you register you get the satisfaction of saving lives in Africa,
  367.      Asia, and South America, and encourage me to produce more software at
  368.      reasonable prices.  You also get the following benefits:
  369.  
  370.          I'll notify you of new FCBIN versions when they become available.
  371.  
  372.          I'll send an updated version of FCBIN to you at no additional cost.
  373.          You can request this at any time.  I'll do this once per registered
  374.          user.
  375.  
  376.          I'll answer questions on FCBIN and its use.  You can contact me at
  377.          the address shown below or via CompuServe mail.
  378.  
  379.          If any important bugs are found I will notify you.
  380.  
  381.          I'll make an attempt (but can't guarantee) to fix any problems you
  382.          find.
  383.  
  384.      Registration is $25.  Please make your check payable to Oxfam America -
  385.      I'll send your checks to Oxfam and record your registration information.
  386.      I'll also accept original canceled checks or receipts from Oxfam that
  387.  
  388.  
  389.  
  390.  
  391.                                       - 6 -
  392.  
  393.      list you as the donor.  Please send payments, registration information,
  394.      and any other correspondence to:
  395.  
  396.                 Mike Albert
  397.                 P. O. Box 535
  398.                 Bedford, MA   01730
  399.  
  400.      I can also be reached via CompuServe mail; my userid is [70325,1134].
  401.  
  402.      Anyone can order the latest version of FCBIN directly from me for a fee
  403.      of $5.00.  Just send the order (make sure it contains your mailing
  404.      address) with your check to the above address.  You'll receive a 5 1/4
  405.      inch 360Kb floppy disk containing the executable and documentation
  406.      files.  If you need other formats (5 1/4 inch 1.2Mb or 3 1/2 inch 720Kb
  407.      or 1.44Mb) I can provide them.  I'll also include other shareware
  408.      products I produce.  If you live outside North America, please send
  409.      extra money for the increased postage.
  410.  
  411.      I welcome all comments and suggestions concerning FCBIN.  I'd like to
  412.      know how you are using FCBIN, where you obtained it, and what problems,
  413.      bugs, or weaknesses you find.  If you tell me about enhancements or
  414.      changes you're interested in, I'll make an effort to provide them.
  415.  
  416.      This program is provided "as is" without warranty of any kind, either
  417.      express or implied, but not limited to the implied warranties of
  418.      merchantability or fitness for a particular purpose.  The entire risk as
  419.      to the results and performance of the program is assumed by the user.
  420.      Should the program prove defective, the user assumes the entire cost of
  421.      all necessary servicing, repair, or correction.
  422.  
  423.  
  424.  
  425.      6   OXFAM AMERICA
  426.  
  427.      As stated in Oxfam literature,
  428.  
  429.          "Oxfam America is an international agency that funds self-help
  430.          development projects and disaster relief in poor countries in
  431.          Africa, Asia, and Latin America, and also prepares and distributes
  432.          educational materials for people in the United States on the issues
  433.          of development and hunger.  The name "Oxfam" comes from the Oxford
  434.          Committee for Famine Relief, founded in England in 1942.  Oxfam
  435.          America, based in Boston, was formed in 1970, and is one of seven
  436.          autonomous Oxfams around the world (Great Britain, Australia,
  437.          Belgium, Canada, Quebec, Hong Kong and the United States).  Oxfam is
  438.          a nonsectarian, nonprofit agency that neither seeks or accepts U.S.
  439.          government funds.  All contributions are tax-deductible to the
  440.          extent permitted by law."
  441.  
  442.      For more information, you can phone Oxfam at 617-482-1211, or write to
  443.      them at:
  444.  
  445.                   Oxfam America
  446.                   26 West Street
  447.                   Boston, MA  02111-1206
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.                                       - 7 -
  457.  
  458.      7   FCBIN REVISION HISTORY
  459.  
  460.          FCBIN version 1.2 - 9/25/92
  461.  
  462.              Fixed occasional malfunction in -c option processing.
  463.  
  464.              Improved display format.
  465.  
  466.              Updated documentation to show new mailing address and CompuServe
  467.              contact information.
  468.  
  469.  
  470.          FCBIN version 1.1 - 6/11/91
  471.  
  472.              Fixed problem processing directories with extensions.
  473.  
  474.              Improved warning messages and error checking.
  475.  
  476.              Ensured that spurious keystrokes are ignored during screen
  477.              display.
  478.  
  479.              Added support of output to screens with more than 25 lines.
  480.  
  481.  
  482.          FCBIN version 1.0 - 8/30/90
  483.  
  484.              Initial release of FCBIN program.
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.                                       - 8 -